/*
 * Author: 李波(Edwin Lee)
 * Date: 2024-07-07 23:30:18
 * FilePath: /code/C++/StringCpp/main.cpp
 * LastEditTime: 2024-08-11 11:43:31
 * version: 1.0
 * Description: 
 */
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>

using namespace std;


int main()
{
	string str = { 'a',' ','b' };
	char buf[] = { 'c','d','\0',' ','f','\0' };
	//str.copy(buf, 4,0);//复试str从0开始的4个字符到buf,不是把buf复制到str
	//cout << str.size() << endl;

	//复制可以用以下方法,空格和0都可以读取
	str.append(buf, 5);
	cout << str.size() << endl;
	return 0;
}